<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>GROOPS - KalmanStaticTemporalNormals</title>

    <!-- JQuery and Popper -->
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>

    <!-- Bootstrap -->
    <!-- https://getbootstrap.com/docs/4.1/examples/ -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

    <!-- Mathjax -->
    <script type="text/x-mathjax-config">
    MathJax.Hub.Config({tex2jax: {inlineMath: [ ['$','$'] ],
                                  displayMath: [ ["\\[","\\]"] ],
                                  processEscapes: true},
                        TeX:     {Macros: {M: ["{\\mathbf #1}",1]},
                                  equationNumbers: {autoNumber: "all"}  }});
    </script>
    <script async src="https://cdn.jsdelivr.net/npm/mathjax@2.7.7/MathJax.js?config=TeX-AMS_CHTML" integrity="sha384-e/4/LvThKH1gwzXhdbY2AsjR3rm7LHWyhIG5C0jiRfn8AN2eTN5ILeztWw0H9jmN" crossorigin="anonymous"></script>

    <!-- lunr -->
    <script src="https://cdn.jsdelivr.net/npm/lunr@2.3.8/lunr.min.js" integrity="sha384-vRQ9bDyE0Wnu+lMfm57BlYLO0/XauFuKpVsZPs7KEDwYKktWi5+Kz3MP8++DFlRY" crossorigin="anonymous"></script>

    <!-- Mustache -->
    <script src="https://cdn.jsdelivr.net/npm/mustache@4.0.1/mustache.min.js" integrity="sha384-0PLEZVBpOQ+Kqw3anJWSNWvRxpEFt02tSpBvyRsA4WcvX/OTldWdXxGLVLvh954H" crossorigin="anonymous"></script>

    <!-- GROOPS Stylesheet -->
    <link rel="stylesheet" href="static/groops.css"/>

    <!-- icon -->
    <link rel="icon" href="static/groops_icon.png">

</head>
<body>
    <header>
        <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
            <div class="container">
              <a class="navbar-brand" href="index.html"><img class="logo" src="static/groops_white.svg"></a>
              <div class="collapse navbar-collapse" id="mainNavbar">
                <ul class="navbar-nav mr-auto">
                  <li class="nav-item">
                    <a class="nav-link" href="programType.html">Programs</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link" href="classes.html">Classes</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link" href="general.parser.html">Parser</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link" href="general.fileFormat.html">File Formats</a>
                  </li>
                </ul>
              </div>
                <form class="form-inline my-2 my-lg-0" action="search.html" id="searchTools">
                  <input class="form-control mr-sm-2" placeholder="Search" name="searchTerms" method="GET" value="" type="text" id="searchBox">
                  <button class="btn btn-secondary my-2 my-sm-0" type="submit" id="searchButton">Search</button>
                </form>
              <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainNavbar" aria-controls="mainNavbar" aria-expanded="false" aria-label="Toggle navigation" style="">
                <span class="navbar-toggler-icon"></span>
              </button>
            </div>
        </nav>
    </header>
    <main class="container px-0 pt-2 top-buffer">
        <div id="content" class="container">
            <h1>KalmanStaticTemporalNormals</h1><p>

This program sets up normal equations based on <a class="groops-class" href="observationType.html">observation</a> for static gravity,
(possibly) multiple long-term <strong class="groops-config-element">temporal</strong> representations and co-estimated high-frequency variations.
It computes the normal equations based on the intervals $i \in \{1, ..., N\}$ given in the <a class="groops-class" href="fileFormat_arcList.html">arcList</a>.
This corresponds to the least-squares adjustment
\[
  \label{eq:temporal-least-squares}
  \begin{bmatrix}
    \mathbf{l}_1 \\
    \mathbf{l}_2 \\
    \vdots \\
    \mathbf{l}_N \\
  \end{bmatrix}
  =
  \begin{bmatrix}
    \Phi^{(0)}_1 \mathbf{A}_1  & \Phi^{(1)}_1 \mathbf{A}_1 & \cdots & \Phi^{(m)}_1 \mathbf{A}_1 \\
    \Phi^{(0)}_2 \mathbf{A}_2  & \Phi^{(1)}_2 \mathbf{A}_2 & \cdots & \Phi^{(m)}_2 \mathbf{A}_2 \\
    \vdots  & \vdots &  & \vdots \\
    \Phi^{(0)}_N \mathbf{A}_N  & \Phi^{(1)}_N \mathbf{A}_N & \cdots & \Phi^{(m)}_N \mathbf{A}_N \\
  \end{bmatrix}
  \begin{bmatrix}
    \mathbf{x}^{(0)} \\
    \mathbf{x}^{(1)} \\
    \vdots \\
    \mathbf{x}^{(m)} \\
  \end{bmatrix}
  +
  \begin{bmatrix}
    \mathbf{e}_1 \\
    \mathbf{e}_2 \\
    \vdots \\
    \mathbf{e}_N \\
  \end{bmatrix},
\]where $\Phi^{(k)}_i$ ($\Phi^{(0)}_i = 1$) are the temporal basis functions specified by a
<a class="groops-class" href="parametrizationTemporalType.html">parametrizationTemporal</a>, for example, a linear trend $\Phi_i = (t_i - t_0)$.
The normal equations corresponding to \eqref{eq:temporal-least-squares} are
computed by accumulation of each interval which leads to
\[
  \label{eq:temporal-normals-full}
  \mathbf{N} = \sum^N_{i=1}
  \begin{bmatrix}
    \Phi^{(0)}_i \mathbf{A}^T_i\\
    \Phi^{(1)}_i \mathbf{A}^T_i \\
    \vdots \\
    \Phi^{(m)}_i \mathbf{A}^T_i \\
  \end{bmatrix}
  \begin{bmatrix}
    \Phi^{(0)}_i \mathbf{A}_i & \Phi^{(1)}_i \mathbf{A}_i & \cdots & \Phi^{(m)}_i \mathbf{A}_i \\
  \end{bmatrix},
  \hspace{15pt}
  \mathbf{n} = \sum^N_{i=1}
  \begin{bmatrix}
    \Phi^{(0)}_i \mathbf{A}^T_i\\
    \Phi^{(1)}_i \mathbf{A}^T_i \\
    \vdots \\
    \Phi^{(m)}_i \mathbf{A}^T_i \\
  \end{bmatrix}
  \mathbf{l}_i.
\]For a single  normal equation block $\mathbf{N}^{(k, l)}$ which corresponds to the correlations
between the parameter sets $\mathbf{x}^{(k)}$ and $\mathbf{x}^{(l)}$ follows
\[
  \label{eq:temporal-normals-expanded}
  \mathbf{N}^{(k, l)} = \sum_{i=1}^{N} (\Phi^{(k)}_i \mathbf{A}^T_i ) (  \Phi^{(l)}_i  \mathbf{A}_i) =
  \sum_{i=1}^{N} \Phi^{(k)}_i \Phi^{(l)}_i  \mathbf{N}_i,
\]where $\mathbf{N}_i = \mathbf{A}_i^T \mathbf{A}_i$.
In analogy to \eqref{eq:temporal-normals-expanded} the right-hand side for each
parameter vector can be computed via
\[
  \label{eq:temporal-normals-rhs-expanded}
  \mathbf{n}^{(k)} = \sum_{i=1}^{N} \Phi^{(k)}_i \mathbf{A}^T_i \mathbf{l}_i =  \sum_{i=1}^{N}  \Phi^{(k)}_i \mathbf{n}_i,
\]utilizing $\mathbf{n}_i$.
The normal equations are therefore only computed once for each interval and then multiplied with the pairwise product of the temporal factors.
Note that the temporal constituents do not necessarily need to be of the same size as the static part.
The number of parameters of the temporal constituents can be varied with <strong class="groops-config-element">parameterCount</strong>.
This simply slices the first <strong class="groops-config-element">parameterCount</strong> columns from the design matrix $\mathbf{A}_i$
and therefore has to be less or equal than the static parameter count.</p><p>If an <a class="groops-class" href="autoregressiveModelSequenceType.html">autoregressiveModelSequence</a> is specified,
high-frequency variations are also set up.
Their purpose is to mitigate temporal aliasing by accounting for short-term gravity field variations.
The parameter count of these high-frequency variations is taken from the dimension of the
<a class="groops-class" href="autoregressiveModelSequenceType.html">autoregressiveModelSequence</a>
and in the same fashion as the temporal variations simply sliced from $\mathbf{A}_i$.
They are modeled as a constant value per interval so the corresponding temporal factor can be expressed as
\[
  \label{eq:daily-parameters}
  \Phi_i(t)
  =
  \begin{cases}
    1 &\text{if} \hspace{5pt} t \in [t_i, t_{i+1}) \\
    0 & \text{otherwise}
  \end{cases}.
\]A detailed description of the approach is given in:
Kvas, A., Mayer-Gürr, T. GRACE gravity field recovery with background model uncertainties.
J Geod 93, 2543–2552 (2019). <a href="https://doi.org/10.1007/s00190-019-01314-1" target="_blank">https://doi.org/10.1007/s00190-019-01314-1</a>.</p><p>Before writing the normal equations to <a class="groops-class" href="fileFormat_normalEquation.html">outputfileNormalEquation</a>
high-frequency gravity and satellite specific parameters are eliminated.
</p>
<table class="table table-hover">
<tr class="table-primary"><th>Name</th><th>Type</th><th>Annotation</th></tr>
<tr class="table-light"><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config mustset">outputfileNormalEquation</div></div></td><td>filename</td><td>outputfile for normal equations</td></tr>
<tr class=""><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config mustset">observation</div></div></td><td><a href="observationType.html">observation</a></td><td></td></tr>
<tr class="table-light"><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config optional">autoregressiveModelSequence</div></div></td><td><a href="autoregressiveModelSequenceType.html">autoregressiveModelSequence</a></td><td>AR model sequence for constraining high frequency variations</td></tr>
<tr class=""><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config optional">temporal</div></div></td><td>sequence</td><td></td></tr>
<tr class="table-light"><td class="m-0"><div class="h-100 config-tree depth-1"><div class="h-100 config mustset-unbounded">parametrization</div></div></td><td><a href="parametrizationTemporalType.html">parametrizationTemporal</a></td><td>use state normals to parametrize time variations (trend, annual, ...)</td></tr>
<tr class=""><td class="m-0"><div class="h-100 config-tree depth-1"><div class="h-100 config mustset">parameterCount</div></div></td><td>uint</td><td>use state normals to parametrize time variations (trend, annual, ...)</td></tr>
<tr class="table-light"><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config optional">inputfileArcList</div></div></td><td>filename</td><td>list to correspond points of time to arc numbers</td></tr>
<tr class=""><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config optional">normalsBlockSize</div></div></td><td>uint</td><td>block size for distributing the normal equations, 0: one block</td></tr>
<tr class="table-light"><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config optional">memorySizePerNodeInGByte</div></div></td><td>double</td><td>avaiable memory for the normal equations (without observation equations)</td></tr>
</table>
This program is <a class="groops-ref" href="general.parallelization.html">parallelized</a>.

        </div>
    </main>
</body>
</html>
